C-Level Extensibility > The C-level extensibility API > JSBool JS_DoubleToValue()

 

JSBool JS_DoubleToValue()

Description

Stores a floating-point number return value in a jsval.

Arguments

JSContext *cx, double dv, jsval *vp

cx is the opaque JSContext pointer that was passed to the JavaScript function.
dv is an 8-byte floating-point number.
vp is a pointer to the jsval into which the contents of the double should be copied.

Returns

A Boolean value indicating success (JS_TRUE) or failure (JS_FALSE).